package com.foeye.test.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/hello")
public class HelloController {
	
	@RequestMapping(method=RequestMethod.GET)
	public String home() {
		return "home";
	}
	@RequestMapping(value="home", method=RequestMethod.GET)
	public ModelAndView home(Model model) {
		model.addAttribute("message", "world! ");
		return new ModelAndView("home");
	}
	
	
	
}
